import request from '@/utils/request'

export function wbNameList(data) {
  return request({
    url: '/wbNameList',
    method: 'post',
    data
  })
}

// 删除
export function destroy(id) {
  return request({
    url: `/wbNameDelete/${id}`,
    method: 'delete'
  })
}

// 查询微博昵称
export function selectName(query) {
  return request({
    url: `/wbSelectName`,
    method: 'get',
    params: query
  })
}

// 添加
export function wbNameCreate(data) {
  return request({
    url: '/wbNameCreate',
    method: 'post',
    data
  })
}

// 更新
export function updateById(data) {
  return request({
    url: `/wbUpdateById`,
    method: 'post',
    data
  })
}

// 微博列表
export function sendList() {
  return request({
    url: `/wbList`,
    method: 'get'
  })
}

// 发布微博
export function sendWeiBo(data) {
  return request({
    url: `/wbSend`,
    method: 'post',
    data
  })
}

// 列表
export function list(query) {
  return request({
    url: '/wb/list',
    method: 'get',
    params: query
  })
}

// 最新微博列表
export function home(query) {
  return request({
    url: '/wb/home',
    method: 'get',
    params: query
  })
}

// 热搜词列表
export function hot() {
  return request({
    url: '/wb/hot',
    method: 'get'
  })
}

// 热搜榜
export function hotSearch() {
  return request({
    url: '/wb/hotSearch',
    method: 'get'
  })
}

// 热搜词详情
export function hotDesc(desc) {
  return request({
    url: '/wb/hotDesc',
    method: 'get',
    params: desc
  })
}

// 热评
export function hotFlow(query) {
  return request({
    url: '/wb/hotFlow',
    method: 'get',
    params: query
  })
}
